package com.ruoyi.emergency.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import com.ruoyi.emergency.service.IEmergencyDeviceClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.emergency.mapper.EmergencyDeviceClassMapper;
import com.ruoyi.emergency.domain.EmergencyDeviceClass;

/**
 * 应急救援物资种类Service业务层处理
 * 
 * @author hcc
 * @date 2024-11-17
 */
@Service
public class EmergencyDeviceClassServiceImpl extends ServiceImpl<EmergencyDeviceClassMapper, EmergencyDeviceClass> implements IEmergencyDeviceClassService //修改
{
    @Autowired
    private EmergencyDeviceClassMapper emergencyDeviceClassMapper;

    /**
     * 查询应急救援物资种类
     * 
     * @param id 应急救援物资种类主键
     * @return 应急救援物资种类
     */
    @Override
    public EmergencyDeviceClass selectEmergencyDeviceClassById(Long id)
    {
        return emergencyDeviceClassMapper.selectEmergencyDeviceClassById(id);
    }

    /**
     * 查询应急救援物资种类列表
     * 
     * @param emergencyDeviceClass 应急救援物资种类
     * @return 应急救援物资种类
     */
    @Override
    public List<EmergencyDeviceClass> selectEmergencyDeviceClassList(EmergencyDeviceClass emergencyDeviceClass)
    {
        return emergencyDeviceClassMapper.selectEmergencyDeviceClassList(emergencyDeviceClass);
    }

    /**
     * 新增应急救援物资种类
     * 
     * @param emergencyDeviceClass 应急救援物资种类
     * @return 结果
     */
    @Override
    public int insertEmergencyDeviceClass(EmergencyDeviceClass emergencyDeviceClass)
    {
        return emergencyDeviceClassMapper.insertEmergencyDeviceClass(emergencyDeviceClass);
    }

    /**
     * 修改应急救援物资种类
     * 
     * @param emergencyDeviceClass 应急救援物资种类
     * @return 结果
     */
    @Override
    public int updateEmergencyDeviceClass(EmergencyDeviceClass emergencyDeviceClass)
    {
        return emergencyDeviceClassMapper.updateEmergencyDeviceClass(emergencyDeviceClass);
    }

    /**
     * 批量删除应急救援物资种类
     * 
     * @param ids 需要删除的应急救援物资种类主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyDeviceClassByIds(Long[] ids)
    {
        return emergencyDeviceClassMapper.deleteEmergencyDeviceClassByIds(ids);
    }

    /**
     * 删除应急救援物资种类信息
     * 
     * @param id 应急救援物资种类主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyDeviceClassById(Long id)
    {
        return emergencyDeviceClassMapper.deleteEmergencyDeviceClassById(id);
    }
}
